//
//  BackgroundLayer.m
//  cocoaTest
//
//  Created by binbinming on 10-2-10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "BackgroundLayer.h"


@implementation BackgroundLayer

+(id) scene
{
	// 'scene' is an autorelease object.
	Scene *scene = [Scene node];
	
	// 'layer' is an autorelease object.
	BackgroundLayer *layer = [BackgroundLayer node];
	
	// add layer as a child to scene
	[scene addChild: layer];
	
	// return the scene
	return scene;
}


// on "init" you need to initialize your instance
-(id) init
{
	// always call "super" init
	// Apple recommends to re-assign "self" with the "super" return value
	if( (self=[super init] )) {
		isTouchEnabled = YES;
		
		backgroundSprite = [backgroundSprite initWithFile:@"coverimg.jpg"];
		[self addChild: backgroundSprite];
	}
	return self;
}


- (void)dealloc {
    [super dealloc];
}


@end
